package LeetCode;

import java.util.ArrayList;
import java.util.List;

public class _94 {
    public List<Integer> inorderTraversal(TreeNode root) {
        List<Integer> list = new ArrayList<>();
        inorderImplement(root,list);
        return list;
    }

    private void inorderImplement(TreeNode root, List<Integer> list) {
        if(root == null)
            return;
        inorderImplement(root.left,list);
        list.add(root.val);
        inorderImplement(root.right,list);
    }
}
